package com.keepercloud.qqchat.service.impl;

import com.keepercloud.qqchat.entity.User;
import com.keepercloud.qqchat.repository.UserListRepository;
import com.keepercloud.qqchat.repository.UserRepository;
import com.keepercloud.qqchat.service.UserListService;
import com.keepercloud.qqchat.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

/**
 * @author liyk
 * @date 2019/2/12
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class UserListServiceImpl implements UserListService {

    final
    private UserListRepository userListRepository;

    @Autowired
    public UserListServiceImpl(UserListRepository userListRepository) {
        this.userListRepository = userListRepository;
    }

    @Override
    public List<Map> getUserList(String username) {
        return userListRepository.getUserList(username);
    }
}
